How to turn an idea into something

I have again reached a point that every developer will eventually reach. I have an idea, what now?

The answer to that question feels somewhat daunting. I have to imagine that there are millions of projects (Not just in software engineering I might add) that have reached this point and never gone any further. It is a suprisingly difficult question to answer. How does one take an idea and form it into something resembling the vision? If you are reading this, it means I have at least started on answering that question.

The way that I have answered is to break the development of Cable down into various other questions that need to be answered. This post will (hopefully!) provide those answers. For those of you who are not interested in this; tough shit, I'm writing it anyway.

What should Cable eventually be able to do?

This one is fairly simple to answer as it is the idea.

The reason for doing all of this in the first place (It's raisin debt if you are a fan of financially beholden dried fruit).

And my current answer is this (Be warned: THIS MAY CHANGE):

Cable should eventually let users define and publish a blog using plain files, Git (Other source control is available!) workflows, and a self-hostable static output directory

Pretty simple, right?

What should the proof of concept look like?

The proof of concept, or Phase 1, should build the smallest useful version of the tool. I.E. A static blog compiler that reads a folder or files and generates a working static website.

Even Simpler, let’s keep going.

What is the minimal viable amount of code that can be written to get to that point?

The code should be able to take an input like this:

my-blog/
  blog.toml
  content/
    posts/
      hello-world.md
  public/
    logo.svg

And from that generate this:

my-blog/dist/
  index.html
  posts/
    hello-world.html
  logo.svg

What language should this tool be written in?

Now this is the slightly trickier question. For every developer, coder, engineer, and baboon you asked this to, you would get a slightly different answer. Go, C, Python, Java, JavaScript, C#, Lua, Perl, Visual Basic, Ruby. The list goes on...

I’m so confident I’d get a different “best” answer that, if comments were enabled, someone would definitely be asking why their favorite programming language wasn’t on the list. (The answer, of course, is simply because I do not consider PHP a language)

However, this particular developers' choice is Rust. There are a number of reasons that I could go into regarding its speed, its efficiency, its understandable documentation, the way the compiler handles errors, the linting tools, the ecosystem, and the memory safe nature of it. But that's boring, so I won't. I instead will give you the only answer one should need:

I like Rust, so I'm building it in Rust.

(There is one slight problem in that when I started building this, I don't actually know much rust. I probably never will. But, c'est la vie)

How should a user expect to use cable?

Eventually, a user should be able to run a series of commands like:

cable verify #Check the build is correct
cable diff #Diff the build against the current dist
cable build #Build the site into the dist

and receive a static blog output that conforms to the code and config that they have parsed in. I also envision a number of helper commands to ease the development

cable dev #Host a local dev server

cable init #Init a project

cable new post #Create a new cable post

However, most of these are not helpful for Phase 1. I also hope that standard blog functions are either:

  • Built as standard ( Tags, archive pages, headers, sidebars, footers, Sitemap, SEO)
  • Or configurable (RSS Feed, Comments, Themes, Search, Analytics)

When have I achieved the goal?

Well, if you are reading this, I have somewhat achieved the goal. If this is live on the internet, then Phase 1 is complete. If you are somehow reading this, and it is not live on the internet, then please kindly log out of my machine.

What next?

Well Phase 2! Which, in broad strokes, will turn this from a small tool into something that another person could actually want to use!

The plan for that will be in a later post. I believe the next post will be how I built phase 1. The choices I made and the corners I undoubtedly cut.

Happy Deving! - CassIO